package org.xmdl.silk.services;

import org.eclipse.xtext.common.services.DefaultTerminalConverters;
import org.eclipse.xtext.conversion.IValueConverter;
import org.eclipse.xtext.conversion.ValueConverter;
import org.eclipse.xtext.conversion.impl.AbstractToStringConverter;
import org.eclipse.xtext.parsetree.AbstractNode;

public class SilkValueConverters extends DefaultTerminalConverters {

	public SilkValueConverters() {
	}

	@ValueConverter(rule = "TERM_DOUBLE")
	public IValueConverter<Double> TERM_DOUBLE() {
		return new AbstractToStringConverter<Double>() {
			@Override
			protected Double internalToValue(String string, AbstractNode node) {
				return Double.valueOf(string);
			}
		};
	}

}
